﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ForkCarRelationManager.db;
namespace ForkCarRelationManager
{
    public partial class GiveupForm : Form
    {
        int repireID=0;
        dbOperate dbo = new dbOperate();
        public GiveupForm(int repireID)
        {
            this.repireID = repireID;
            InitializeComponent();
        }

        private void GiveupForm_Load(object sender, EventArgs e)
        {

        }

        private void buttonX1_Click(object sender, EventArgs e)
        {
            if (Remark.Text.Trim() != "")
            {
                if (dbo.UpdateAndInsert("update RepireInfor set Ifhandle=2, GiveUpReson='"+Remark.Text.Trim()+"' where ID=" + repireID))
                {
                    MessageBox.Show("放弃成功");
                    this.DialogResult = DialogResult.Yes;
                }
            }
            else
                MessageBox.Show("放弃理由不能为空");
        }
    }
}
